"""
部门相关模式
"""
from pydantic import BaseModel
from typing import Optional, List
from .base import BaseSchema, TimestampMixin


class DepartmentBase(BaseModel):
    """部门基础模式"""
    name: str
    description: Optional[str] = None


class DepartmentCreate(DepartmentBase):
    """创建部门"""
    pass


class DepartmentUpdate(BaseModel):
    """更新部门"""
    name: Optional[str] = None
    description: Optional[str] = None


class DepartmentResponse(DepartmentBase, TimestampMixin, BaseSchema):
    """部门响应"""
    id: int
